//
//  ZyaBillModel.swift
//
//  Created by 邱仙凯 on 2018/12/24
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public class ZyaBillModel: Mappable {

  // MARK: Declaration for string constants to be used to decode and also serialize.
  private struct SerializationKeys {
    static let orgCode = "org_code"
    static let orgName = "org_name"
    static let sMoneyYsjeSy = "s_money_ysje_sy"
    static let sClientNm = "s_client_nm"
    static let sMoneyFk = "s_money_fk"
    static let sMonth = "s_month"
    static let sClientId = "s_client_id"
    static let sMoneyXz = "s_money_xz"
    static let sOperationNm = "s_operation_nm"
    static let sAreaNm = "s_area_nm"
    static let sMoneyYsjeBy = "s_money_ysje_by"
    static let sMoneyZk = "s_money_zk"
    static let filesn = "filesn"
    static let url = "url"
    
  }

  // MARK: Properties
  public var orgCode: String?
  public var orgName: String?
  public var sMoneyYsjeSy: Int?
  public var sClientNm: String?
  public var sMoneyFk: Int?
  public var sMonth: String?
  public var sClientId: String?
  public var sMoneyXz: Int?
  public var sOperationNm: String?
  public var sAreaNm: String?
  public var sMoneyYsjeBy: Int?
  public var sMoneyZk: Int?
    public var filesn: String?
    public var url: String?
  // MARK: ObjectMapper Initializers
  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public required init?(map: Map){

  }

  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public func mapping(map: Map) {
    orgCode <- (map[SerializationKeys.orgCode],StringTransform())
    orgName <- map[SerializationKeys.orgName]
    sMoneyYsjeSy <- map[SerializationKeys.sMoneyYsjeSy]
    sClientNm <- map[SerializationKeys.sClientNm]
    sMoneyFk <- map[SerializationKeys.sMoneyFk]
    sMonth <- map[SerializationKeys.sMonth]
    sClientId <- (map[SerializationKeys.sClientId],StringTransform())
    sMoneyXz <- map[SerializationKeys.sMoneyXz]
    sOperationNm <- map[SerializationKeys.sOperationNm]
    sAreaNm <- map[SerializationKeys.sAreaNm]
    sMoneyYsjeBy <- map[SerializationKeys.sMoneyYsjeBy]
    sMoneyZk <- map[SerializationKeys.sMoneyZk]
    filesn <- map[SerializationKeys.filesn]
    url <- map[SerializationKeys.url]
  }

  /// Generates description of the object in the form of a NSDictionary.
  ///
  /// - returns: A Key value pair containing all valid values in the object.
  public func dictionaryRepresentation() -> [String: Any] {
    var dictionary: [String: Any] = [:]
    if let value = orgCode { dictionary[SerializationKeys.orgCode] = value }
    if let value = orgName { dictionary[SerializationKeys.orgName] = value }
    if let value = sMoneyYsjeSy { dictionary[SerializationKeys.sMoneyYsjeSy] = value }
    if let value = sClientNm { dictionary[SerializationKeys.sClientNm] = value }
    if let value = sMoneyFk { dictionary[SerializationKeys.sMoneyFk] = value }
    if let value = sMonth { dictionary[SerializationKeys.sMonth] = value }
    if let value = sClientId { dictionary[SerializationKeys.sClientId] = value }
    if let value = sMoneyXz { dictionary[SerializationKeys.sMoneyXz] = value }
    if let value = sOperationNm { dictionary[SerializationKeys.sOperationNm] = value }
    if let value = sAreaNm { dictionary[SerializationKeys.sAreaNm] = value }
    if let value = sMoneyYsjeBy { dictionary[SerializationKeys.sMoneyYsjeBy] = value }
    if let value = sMoneyZk { dictionary[SerializationKeys.sMoneyZk] = value }
    if let value = filesn { dictionary[SerializationKeys.filesn] = value }
    if let value = url { dictionary[SerializationKeys.url] = value }
    return dictionary
  }

}
